package com.caizi.designpattern.factory.simplefactory;

public class Factory {

    public static IApi createApi(int i) {
        switch (i) {
        case 1:
            return new ImplApiA();
        case 2:
            return new ImplApiB();
        default:
            return new ImplApiA();
        }
    }
}
